SGAddMovieData
TheSGAddMovieData
function allows your channel component to add data to a movie. This function combines the services provided by theSGWriteMovieData
andSGAddFrameReference
functions. Your channel component should not write data directly to the movie file--use this function instead.
pascal ComponentResult SGAddMovieData (SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType);
s
- Specifies the component instance that identifies the sequence grabber component that is using your channel. The sequence grabber provides this to you when it calls your
SGInitChannel
function (described on page 6-36).c
- Identifies the connection to your channel.
p
- Specifies the location of the data to be added to the movie.
len
- Indicates the number of bytes of data to be added to the movie.
offset
- Contains a pointer to a field that is to receive the offset to the new data in the movie. The sequence grabber component returns an offset that is correct in the context of the movie resource, even if the movie is currently stored in memory. That is, if the movie is in memory, the returned offset reflects the location that the data will have in a movie on a permanent storage device, such as a disk.
chRefCon
- Contains your channel's reference constant.
time
- Specifies the time at which your channel captured the frame. This time value is expressed in your channel's time scale.
writeType
- Specifies the type of write operation. The following values are valid:
seqGrabWriteAppend
- Append the new data to the end of the file. The sequence grabber sets the field referred to by the
offset
parameter to reflect the location at which it added the data.seqGrabWriteReserve
- Do not write any data to the output file. Instead, reserve space in the output file for the amount of data indicated by the
len
parameter. The sequence grabber sets the field referred to by theoffset
parameter to the location of the reserved space.seqGrabWriteFill
Write the data into the location specified by the field referred to by theoffset
parameter. The sequence grabber sets that field to the location of the byte following the last byte it wrote.- This option is used to fill the space reserved previously when the
writeType
parameter was set toseqGrabWriteReserve
.RESULT CODES
File Manager errors
Memory Manager errors
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help